A demonstration project showcasing baseline types & animation capabilities using Bun runtime.
This project demonstrates the use of Bun runtime for creating a fast and efficient server-side application with baseline types and animation capabilities. It includes various environments for deployment and a detailed technical architecture.
To get started with the project:
To install dependencies:
bun install
To run:
bun start
Environment | Link |
---|---|
Live | Live |
Local | Local |
Railway | Railway |
Cloudflare | Cloudflare |
This project was created using bun init
in bun v1.0.23. Bun is a fast all-in-one JavaScript runtime.
%%{init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#e1f5fe',
'primaryTextColor': '#000',
'primaryBorderColor': '#00b0ff',
'lineColor': '#00838f',
'secondaryColor': '#fff8e1',
'tertiaryColor': '#f3e5f5'
}
}}%%
graph TD
classDef default fill:#e1f5fe,stroke:#00b0ff,stroke-width:2px;
classDef process fill:#fff8e1,stroke:#ffa000,stroke-width:2px;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px;
A[Start Server] --> B[Load Initial Content]
B --> C[Initialize Bun Server]
C -->|Incoming Request| D{Request Type?}
D -->|WebSocket| E[Handle WebSocket]
D -->|HTTP| F[Process HTTP Request]
F -->|Static Asset| G[Handle Static Assets]
F -->|Page Request| H[Handle Page Rendering]
I[File Watcher] -->|File Change| J{File Type?}
J -->|CSS/JS/TS| K[Rebuild Files]
J -->|Content| L[Reload Content]
K -->|Success| M[Update Script Paths]
M --> N[Notify WebSocket Clients]
L --> N
class D,J decision;
class K,L,M process;
The project structure is as follows:
baseline-animation/
├── src/
│ ├── index.ts
│ ├── components/
│ ├── styles/
│ └── utils/
├── public/
│ ├── index.html
│ └── assets/
├── bun.lockb
├── package.json
└── README.md
- Clone the repository
- Install dependencies using
bun install
- Start the development server using
bun start
- Make changes and see them reflected in real-time
Bun runtime is designed for performance, with fast startup times and efficient handling of server-side tasks. This project leverages these capabilities to provide a smooth and responsive experience.
We welcome contributions! Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
This project is licensed under the MIT License. See the LICENSE file for details.